/*
 * Copyright (c) 2010 CCX(China) Co.,Ltd. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * CCX(China) Co.,Ltd. ("Confidential Information").
 * It may not be copied or reproduced in any manner without the express 
 * written permission of CCX(China) Co.,Ltd.
 *
 * Author: zhaosj
 * Date: 2011-1-18 上午09:03:21
 */
package com.timer;

import java.util.Calendar;
import java.util.Timer;
import java.util.TimerTask;

/**
 * @author zhaosj
 * 
 */
public class TestTimer {

	static class MyTask extends TimerTask {
		
		@Override
		public void run() {

			System.out.println(Math.random());

		}
	}

	public static void main(String[] args) {

		Timer timer = new Timer();
		timer.schedule(new MyTask(), 0, 1000);
	}

}
